Network devices, such as switches or routers, may be used not only to route and/or switch data packets to their destinations, but may also be used to collect information related to the data packets and network traffic. Existing network devices that collect flow statistics and/or sample data packets are not able to correlate flow statistics with sampled data packets as these functions are performed by different components at different points within the network device.